<?php 
	$auth = new AuthModel();
	$user_type = $auth->getUserInfo('type');	

	$room = $this->room;
	$step1_back_link = "/user/order/index/date/" . $this->date . "/number_seat/" . $room->number_seat;
	$step2_back_link = "/user/order/step2/date/" . $this->date 
						. "/start_time/" . $this->start_time
						. "/end_time/" . $this->end_time
						. "/number_seat/" . $room->number_seat;
?>

<section class="grid_8" style="margin-left: 5%;width:90%"　id="winzard-wrapper">
	<div class="block-border"><div class="block-content">
		<h1>会議室予約</h1>
		
		<div class="block-controls">
			<ul class="controls-buttons">
				<li>
					<a href="<?php echo $step2_back_link?>" title="前のステップ">
						<img src="/images/icons/fugue/navigation-180.png" width="16" height="16">
						前のステップ
					</a>
				</li>
			</ul>
		</div>
		
		<ol class="wizard-steps">
			<li>
				<a href="<?php echo $step1_back_link?>">
					<span class="number">1<span class="status-ok"></span></span>
					日と席の数を選択
				</a>
			</li>
			<li>
				<a href="<?php echo $step2_back_link?>">
					<span class="number">2<span class="status-ok"></span></span>
					予約時間を選択
				</a>
			</li>
			<li>
				<span class="number">3</span>
				確認
			</li>
		</ol>
		
		<span class="number bigger">3</span>
		<small>会議室予約</small>
		<h2 class="bigger">確認</h2>
		
		<form class="form" id="add_form" method="post" action="/user/order/order">
			<fieldset class="grey-bg inline-label">
				<legend>予約情報</legend>
				
				<?php if($user_type == ADMIN_USER):?>
					<p>
						<label for="user_id">テナント</label>
						<span><?php echo $this->formSelect("user_id", NULL, NULL, $this->list_user)?></span>
					</p>
				<?php endif;?>
				
				<p>
					<label for="room">会議室</label>
					<span><?php echo $room->code?></span>
					<span>(<?php echo $room->number_seat?>席、</span>
					<span><?php echo number_format($room->rent_price)?> VND/30分)</span>
					<?php echo $this->formHidden("room_id", $room->id)?>
					<?php echo $this->formHidden("rent_price",$room->rent_price)?>
				</p>
				
				<p>
					<label for="date">予約日</label>
					<span><?php echo $this->date?></span>
					<?php echo $this->formHidden("date", $this->date)?>
				</p>
				
				<p>
					<label for="order_time">予約時間</label>
					<span><?php echo $this->start_time . " ~ " . $this->end_time?></span>
					<?php echo $this->formHidden("start_time", $this->start_time)?>
					<?php echo $this->formHidden("end_time", $this->end_time)?>
				</p>
				
				<p>
					<label for="name">料金</label>
					<span><?php echo number_format($this->fill)?> VND</span>
				</p>
				
				<p class="inline-label" style="clear: both;">
					<label style="color:red">予約手数料</label>
					<span style="color:red"><?php echo number_format(ORDER_FEE)?> VND</span>
				</p>
				
			</fieldset>
			<fieldset class="grey-bg no-margin">
				<p>
					<button type="submit">予約</button>
				</p>
			</fieldset>
		</form>
	</div>
	</div>
</section>

<script type="text/javascript">
	$(document).ready(function(){
		$("html, body").animate({scrollTop: $("#status-bar").offset().top}, "slow");
	});
</script>